#include <EWrapper.h>
#include <PosixTestClient.h>

#ifndef _CLIENTREQ_
#define _CLIENTREQ_

/*security definition needs:
 *
 */

typedef long TickerID;

void Realtime_Tick(PosixTestClient *client,TickerID id/*id, security def*/);
void Realtime_Bar(PosixTestClient *client,int id, int bar_size);
void EMA(/*id, Security def, int bar size, int num_bars*/);

//EMA: S1 = Y1 (Y is the series data)
//for t > 1, St = aYt + (1-a)*S(t-1)
//a = 2/(N+1)
//St is the value of EMA at period t
double* EMA_calc(double* array, int size);


void MACD(/*id, sec def, int bar size*/);
//MACD is difference between slow EMA and fast EMA
//MACD = EMA(length1) - EMA(length2)
//signal = EMA(MACD, length3)
//histogram = MACD - signal

void cancel_Tick(PosixTestClient *client,TickerID id);
void cancel_Bar(PosixTestClient *client,int id);
void cancel_EMA(/*id*/);
void cancel_MACD(/*id*/);


#endif
